//k1优化升级 2020.5.23

params ["_blasted", "_sw"];

//if (!alive _blasted || {!(_blasted getVariable ['FAR_once_eh',true])} || {_blasted getVariable ['FAR_Only_one_EH',0] == 1} || {_blasted getVariable ['FAR_isUnconscious',0] == 1} || {_blasted getVariable ['AT_Revive_isUnconscious',false]} || {lifeState _blasted == 'INCAPACITATED'} || {lifeState _blasted == "UNCONSCIOUS"} || {!isNull objectParent _blasted}) exitWith {};

private ["_damage", "_Adjust", "_Commit"];
if (_sw) then [{_damage = .9; _Adjust = 6; _Commit = 5},{_damage = .35 + random .45; _Adjust = 3; _Commit = 3}];
if (_blasted == player) then {
	cutText ["受到筒子尾焰冲击！", "Plain Down", .5];
	"dynamicBlur" ppEffectEnable true;
	"dynamicBlur" ppEffectAdjust [_Adjust];
	"dynamicBlur" ppEffectCommit 0;
	"dynamicBlur" ppEffectAdjust [0];
	"dynamicBlur" ppEffectCommit _Commit;
	for "_i" from 0 to 4 do {playSound "combat_deafness"};
}; //5倍音量
if (_damage > damage _blasted) then {_blasted setDamage _damage};
if (!_sw) exitWith {};

_blasted setUnconscious true;
if (isServer) then [{_blasted call CRS_unconscious_debug},{CRS_blasted = _blasted; publicVariableServer "CRS_blasted"}];

